<%@ page language="java" contentType="text/html;charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@include file="/views/common/include/taglib.jsp"%>
<link type="text/css" rel="stylesheet" href="${ctx}/css/dlifestyle/menustyle.css" />
<script>

function hideLeftMenu(){
    $(".left_menu,.ce").animate({left:'-200px'}, "fast");
    $("#hide_botton").animate({'margin-left':'0'},"fast",function() {
    	$(this).hide().css("margin-left","158px");
    	$("#show_botton").show();
    });
    $(".main").animate({width:'90%' , "margin-left":"5%"}, 'fast');
    
    //隐藏和显示的时候让footer也移动
    if($(document).height()-4 <= $(window).height()){
    	$("div.footer_company").animate({
    		width:$(window).width(),
    		left:0
    	}, "fast");
    }else{
    	$("div.footer_company").animate({
    		width:$(window).width() * 0.9,//左右两边各有5%的margin
    		left:0
    	}, "fast");
    }
    
}

function showLeftMenu(){
    $(".left_menu,.ce").animate({left:0}, "fast");
    $("#show_botton").animate({'margin-left':'158px'}, "fast",function() {
    	$(this).hide().css("margin-left",0);
    	$("#hide_botton").show();
    });
    
    
    //不同分辨率适配
    if($(window).width() > 1440){
    	$(".main").animate({"width":"83%" , "margin-left":"264px"}, "fast");
    }else if($(window).width() <1200){
    	$(".main").animate({"width":"73%" , "margin-left":"264px"}, "fast");
    }else{
    	$(".main").animate({"width":"78%" , "margin-left":"264px"}, "fast");
    }
    
    $("div.footer_company").animate({
		width:$(window).width() - 289,
		left:234
	}, "fast");
}

 if($(window).width() > 1440){
	//$(".main").css("width", "83%");
	$(".main").css("margin-left", "240px");
}else if($(window).width() <1200){
	//$(".main").css("width", "73%");
	$(".main").css("margin-left", "240px");
}else{
	//$(".main").css("width", "78%");
	$(".main").css("margin-left", "240px");
} 
/* function test(){
	$.get("${ctx}/updateNewsData", function(data){
	data = JSON.parse(data);
	$('.unRead').html(data.obj);
		
	})
} */
</script>
<!-- <script type="text/javascript">
    $(function(){
        if($("#hasReadOrNot").val() == 0) {
               $(".unRead").css("display","none");
           } 
    });
    </script> -->
<div id="hide_botton" style="position: fixed;padding:3px;z-index: 99;display: none;">
    <a onclick="hideLeftMenu()" class="hide_botton">&lt;</a>
</div>
<div id="show_botton" class="show_botton">
    <a onclick="showLeftMenu()">&gt;</a>
</div>
	<!--二级导航-->	
<div class="left" id="left_menu">
<div class="left_menu">
<ul class="ce"  style="width:220px;">
     <li class="show_botton_slide">
     	<img src="${ctx}/images/seller/goods/menu.png" style="margin-right:18px;"/>${sessionScope.firstMenu }
     	<img src="${ctx}/images/seller/goods/drop-down.png" style="margin-right:30px;float: right;margin-top:10px;"/>
     </li>
    	<c:forEach items="${sessionScope.secondMenus }" var="secondMenu" varStatus="itemStatus">
  			<%-- <c:if test="${secondMenu.id == 100146407085782600}">
					<div class="unRead" 
						style="float: left; position: fixed; margin-left: 136px; margin-top: 10px; background-color: #FF8C05; color: #FFFFFF; width: 22px; 
						height: 22px; border-radius: 50%; text-align: center; font-size: 14px; font-family: '微软雅黑'; line-height: 22px;">
						${unRead}
						<input type="hidden" value="${unRead}" id="hasReadOrNot" />
						</div>
				</c:if> --%>
  			<li id="secondMenu${secondMenu.id}" name="secondMenu" class="second-menu">
  				<a onclick="clickSecondMenu(${secondMenu.id} , '${secondMenu.locationURL}');test();">${secondMenu.menuName}
  					<img  src="${ctx }/images/seller/goods/nav-right.png" style="margin-right:20px;float: right;margin-top:5px;"/>
  				</a>
  				
  			</li>
    	</c:forEach>
</ul>
</div>
</div>
